package llvmast;
public  class LlvmBranch extends LlvmInstruction{
	LlvmLabelValue lblTrue,lblFalse;
	LlvmValue cond;
	
    public LlvmBranch(LlvmLabelValue label){		
		this.lblTrue = label;
    }
    
    public LlvmBranch(LlvmValue cond,  LlvmLabelValue brTrue, LlvmLabelValue brFalse){
		this.cond = cond;
		this.lblTrue = brTrue;
		this.lblFalse = brFalse;
    }

    public String toString(){
		if(cond != null)
			return "br i1 " + cond + ", label %" + lblTrue + ", label %" + lblFalse;
		else
			return "br label %" + lblTrue;
    }
}
